{% extends 'xadmin/base.html' %}

{% block title %}
    编辑文件
{% endblock %}

{% block main %}
    <form method="POST" class="form-horizontal" action=""> {% csrf_token %}
        <input type="hidden" name="file_path" value="{{ file_path }}">
        <input type="hidden" name="dir_path" value="{{ dirpath }}">
        <textarea name="code" class="layui-code" lay-title="JavaScript" lay-skin="notepad" style="width:100%;height:800px;">
            {{ code }}
        </textarea>
        <div class="col-sm-4 col-sm-offset-2">
            <button class="btn btn-primary" type="submit">保存内容</button>
            <a class="btn btn-white" href="#" onclick="javascript:history.back(-1);">取消</a>
        </div>
    </form>
{% endblock %}